﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TrangChu.master" AutoEventWireup="true"
    CodeFile="LichSuGiaoDich.aspx.cs" Inherits="LichSuGiaoDich" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%">
        <tr>
            <td>
                <div class="cnt_block1">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="c_top_c">
                                &nbsp;<br />
                                &nbsp;LỊCH SỬ GIAO DỊCH<br />
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="Panelfull0" Visible="false" runat="server">
                    <center>
                        <table width="50%">
                            <tr>
                                <td colspan="2">
                                    <asp:Label ID="showthongbaoz" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="tienhanhsua" runat="server" Text="SỬA NGAY" 
                                        onclick="tienhanhsua_Click" />
                                </td>
                                <td>
                                    <asp:Button ID="khongsua" runat="server" Text="QUAY LẠI" 
                                        onclick="khongsua_Click" />
                                </td>
                            </tr>
                        </table>
                    </center>
                </asp:Panel>
                <asp:Label ID="showthongbao0" runat="server" Text=""></asp:Label>
                <asp:Panel ID="Panelfull" Visible="false" runat="server">
                    <font color="blue">Xem Danh Sách : </font>
                    <asp:DropDownList ID="chonkieu" AutoPostBack="true" runat="server" 
                        onselectedindexchanged="chonkieu_SelectedIndexChanged">
                        <asp:ListItem Text="Chưa Giao Hàng" Value="1" Selected="true"></asp:ListItem>
                        <asp:ListItem Text="Đã Giao Hàng" Value="2" Selected="false"></asp:ListItem>
                    </asp:DropDownList>
                    <hr color="#008000" size="1">
                    <asp:Panel ID="Panelchuagiaohang" runat="server">
                        <asp:Label ID="showthongbao1" runat="server" Text=""></asp:Label>
                        <asp:GridView ID="bangchuagiaohang" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%" AllowSorting="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:HyperLink ID="xemchitiet" runat="server" ImageUrl="images/nut/chitiet.gif" NavigateUrl='<%# "LichSuGiaoDich.aspx?man=xem&id=" + Eval("maddh") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="T&#202;N NN">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="tennn2" Width="100px" Text='<%# Eval("tennguoinhan") %>' runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="tennn1" Width="150px" Text='<%# Eval("tennguoinhan") %>' ReadOnly="true"
                                            runat="server"></asp:TextBox>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="ĐC">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="xemdiachi" runat="server" NavigateUrl='<%# "LichSuGiaoDich.aspx?xemdiachi=" + Eval("maddh") %>'>XEM</asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="dienthoainn" ReadOnly="True" HeaderText="ĐT">
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="NĐH">
                                    <ItemTemplate>
                                        <div title="NGÀY ĐẶT HÀNG">
                                            <%#(String.Format("{0:MM/dd/yy}", DataBinder.Eval(Container, "DataItem.ngaydh")))%></div>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="NGH">
                                    <ItemTemplate>
                                        <div title="NGÀY GIAO HÀNG">
                                            <%#(String.Format("{0:MM/dd/yy}", DataBinder.Eval(Container, "DataItem.ngayhg")))%></div>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <div title="SỬA ĐƠN ĐẶT HÀNG">
                                            <asp:HyperLink ID="suaddh" NavigateUrl='<%# "~/LichSuGiaoDich.aspx?suaddh=" + Eval("maddh")%>'
                                                runat="server">SỬA</asp:HyperLink></div>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="Blue" HorizontalAlign="Right" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" Mode="NumericFirstLast"
                                PageButtonCount="5" />
                        </asp:GridView>
                    </asp:Panel>
                    <asp:Panel ID="Paneldagiaohang" Visible="false" runat="server">
                        <asp:Label ID="showthongbao2" runat="server" Text=""></asp:Label>
                        <asp:GridView ID="bangdagiaohang" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%" AllowSorting="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:HyperLink ID="xemchitiet" runat="server" ImageUrl="images/nut/chitiet.gif" NavigateUrl='<%# "LichSuGiaoDich.aspx?man=xem&id=" + Eval("maddh") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="T&#202;N NN">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="tennn2" Width="100px" Text='<%# Eval("tennguoinhan") %>' runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="tennn1" Width="150px" Text='<%# Eval("tennguoinhan") %>' ReadOnly="true"
                                            runat="server"></asp:TextBox>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="ĐC">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="xemdiachi" runat="server" NavigateUrl='<%# "LichSuGiaoDich.aspx?xemdiachi=" + Eval("maddh") %>'>XEM</asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="dienthoainn" ReadOnly="True" HeaderText="ĐT">
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="NĐH">
                                    <ItemTemplate>
                                        <div title="NGÀY ĐẶT HÀNG">
                                            <%#(String.Format("{0:MM/dd/yy}",DataBinder.Eval(Container, "DataItem.ngaydh"))) %></div>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="NGH">
                                    <ItemTemplate>
                                        <div title="NGÀY GIAO HÀNG">
                                            <%#(String.Format("{0:MM/dd/yy}",DataBinder.Eval(Container, "DataItem.ngayhg")))%></div>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="Blue" HorizontalAlign="Right" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" Mode="NumericFirstLast"
                                PageButtonCount="5" />
                        </asp:GridView>
                    </asp:Panel>
                    <asp:Panel ID="Paneldiachichitiet" Visible="false" runat="server">
                        <br />
                        <hr color="#008000" size="1">
                        <asp:TextBox ID="diachichitiet" ReadOnly="true" TextMode="MultiLine" Width="100%"
                            Height="300" runat="server"></asp:TextBox>
                    </asp:Panel>
                    <asp:Panel ID="Panelchitietddh" Visible="false" runat="server">
                        <br />
                        <hr color="#008000" size="1">
                        <asp:Label ID="showthongbao3" runat="server" Text=""></asp:Label>
                        <asp:GridView ID="xemchitiet" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField HeaderText="TÊN HÀNG HÓA" SortExpression="tenhh">
                                    <ItemTemplate>
                                        <asp:TextBox ID="tenhh" Width="90%" ReadOnly="True" runat="server" Text='<%#Eval("tenhh") %>'></asp:TextBox>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="dongiaban" HeaderText="ĐƠN GI&#193;" SortExpression="dongiaban">
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="sldat" HeaderStyle-HorizontalAlign="left" HeaderText="SỐ LƯỢNG"
                                    SortExpression="sldat" />
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="Blue" HorizontalAlign="Right" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" Mode="NumericFirstLast"
                                PageButtonCount="5" />
                        </asp:GridView>
                    </asp:Panel>
                </asp:Panel>
            </td>
    </table>
</asp:Content>
